package com.huawei.petapp2.entity;

public class Result {
    private int code;
    private String msg;
    private String data;
    private int type;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getResult() {
        return data;
    }

    public void setResult(String data) {
        this.data = data;
    }

    public int getType() {
        return type;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data='" + data + '\'' +
                '}';
    }

    public void setSuccess(String msg, String data){
        this.code=1000;
        this.msg="success-"+msg;
        this.data=data;
    }
    public void setInfo(String msg, String data){
        this.code=1001;
        this.msg="warning-"+msg;
        this.data=data;
    }
}

